import {Platform} from 'react-native';
import _updateConfig from './update.json';
import {Pushy, PushyProvider} from 'react-native-update';
import App from './App';

const {appKey} = (_updateConfig as any)[Platform.OS];

const pushyClient = new Pushy({
  appKey,
  debug: true,
  logger: ({type, data}) => {
    console.log(type, data);
  },
});

export default function Root() {
  return (
    <PushyProvider client={pushyClient}>
      <App />
    </PushyProvider>
  );
}
